package com.yidu.best.TA.Statistics.domain;

import java.math.BigDecimal;

public class Statistics {
	/**
	 * 基金Id
	 */
	private String fundId;

	/**
	 * 基金代码
	 */
	private String fundNo;

	/**
	 * 基金名
	 */
	private String fundName;

	/**
	 * 项目类型
	 */
	private String securitiesType;

	/**
	 * 项目名
	 */
	private String securitiesName;

	/**
	 * 行情
	 */
	private BigDecimal nav;

	/**
	 * 份额
	 */
	private int share;

	/**
	 * 市值|余额|费用
	 */
	private BigDecimal turnover;

	/**
	 * 应收应付类型
	 */
	private int flag;

	public Statistics() {
		super();
	}

	public Statistics(String fundId, String fundNo, String fundName, String securitiesType, String securitiesName,
			BigDecimal nav, int share, BigDecimal turnover, int flag) {
		super();
		this.fundId = fundId;
		this.fundNo = fundNo;
		this.fundName = fundName;
		this.securitiesType = securitiesType;
		this.securitiesName = securitiesName;
		this.nav = nav;
		this.share = share;
		this.turnover = turnover;
		this.flag = flag;
	}

	@Override
	public String toString() {
		return "Statistics [fundId=" + fundId + ", fundNo=" + fundNo + ", fundName=" + fundName + ", securitiesType="
				+ securitiesType + ", securitiesName=" + securitiesName + ", nav=" + nav + ", share=" + share
				+ ", turnover=" + turnover + ", flag=" + flag + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + flag;
		result = prime * result + ((fundId == null) ? 0 : fundId.hashCode());
		result = prime * result + ((fundName == null) ? 0 : fundName.hashCode());
		result = prime * result + ((fundNo == null) ? 0 : fundNo.hashCode());
		result = prime * result + ((nav == null) ? 0 : nav.hashCode());
		result = prime * result + ((securitiesName == null) ? 0 : securitiesName.hashCode());
		result = prime * result + ((securitiesType == null) ? 0 : securitiesType.hashCode());
		result = prime * result + share;
		result = prime * result + ((turnover == null) ? 0 : turnover.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Statistics other = (Statistics) obj;
		if (flag != other.flag)
			return false;
		if (fundId == null) {
			if (other.fundId != null)
				return false;
		} else if (!fundId.equals(other.fundId))
			return false;
		if (fundName == null) {
			if (other.fundName != null)
				return false;
		} else if (!fundName.equals(other.fundName))
			return false;
		if (fundNo == null) {
			if (other.fundNo != null)
				return false;
		} else if (!fundNo.equals(other.fundNo))
			return false;
		if (nav == null) {
			if (other.nav != null)
				return false;
		} else if (!nav.equals(other.nav))
			return false;
		if (securitiesName == null) {
			if (other.securitiesName != null)
				return false;
		} else if (!securitiesName.equals(other.securitiesName))
			return false;
		if (securitiesType == null) {
			if (other.securitiesType != null)
				return false;
		} else if (!securitiesType.equals(other.securitiesType))
			return false;
		if (share != other.share)
			return false;
		if (turnover == null) {
			if (other.turnover != null)
				return false;
		} else if (!turnover.equals(other.turnover))
			return false;
		return true;
	}

	public String getFundId() {
		return fundId;
	}

	public void setFundId(String fundId) {
		this.fundId = fundId;
	}

	public String getFundNo() {
		return fundNo;
	}

	public void setFundNo(String fundNo) {
		this.fundNo = fundNo;
	}

	public String getFundName() {
		return fundName;
	}

	public void setFundName(String fundName) {
		this.fundName = fundName;
	}

	public String getSecuritiesType() {
		return securitiesType;
	}

	public void setSecuritiesType(String securitiesType) {
		this.securitiesType = securitiesType;
	}

	public String getSecuritiesName() {
		return securitiesName;
	}

	public void setSecuritiesName(String securitiesName) {
		this.securitiesName = securitiesName;
	}

	public BigDecimal getNav() {
		return nav;
	}

	public void setNav(BigDecimal nav) {
		this.nav = nav;
	}

	public int getShare() {
		return share;
	}

	public void setShare(int share) {
		this.share = share;
	}

	public BigDecimal getTurnover() {
		return turnover;
	}

	public void setTurnover(BigDecimal turnover) {
		this.turnover = turnover;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}
}
